package com.hc.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    private static final Logger logger = LoggerFactory.getLogger(HelloController.class);

    @GetMapping("/hello")
    public String index(@RequestParam String name) {
        logger.info("request two name is: " + name);
        try {
            Thread.sleep(100000);
        } catch (Exception e) {
            logger.error("hello two error", e);
        }
        return "hello " + name + ", this is first message";
    }
}
